<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title>用户中心 - <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></title>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/css/global.css"/>
    <script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/flexible.min.js"></script>
    <style>
        .btn-sign {
            background-color: #ff5555;
            color: #fff;
            width: 0.6rem;
            height: 0.17rem;
            border-radius: 0.1rem;
            text-align: center;
            vertical-align: top;
        }
    </style>
</head>
<body>
<div class="w100">
    <div class="w100  bg-white flex-wrp flex-align-center flex-between lh100 plr15 ptb15">
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/return.png" class="pt-return">
        <div class="size18 bold color37">个人中心</div>

        <div>
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/ellipsis.png" class="mr5 pt-ellipsis">
        </div>
        <div class="pt5 pb5 pt-tip">
            <a href="<?php echo \Kuxin\Helper\Url::build("index.index",[],"");?>" class="block color1 text-center pt-tip-item" title="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>">前往首页</a>
            <a href="<?php echo \Kuxin\Helper\Url::build("novel.search.index",[],"");?>" class="block color1 text-center pt-tip-item">搜索小说</a>
        </div>
    </div>

    <div class="flex-wrp bg-white flex-cell flex-center bold ptb20">
        <img src="<?php echo $userinfo['avatar'];?>" class="pt-avatar">
        <div class="size16 color7 pt10 pb10">
            <?php $isvip=\Kuxin\Block::show('user.isvip', ['userid'=>$userinfo['id']]);?>
            <a href="<?php echo \Kuxin\Helper\Url::build("user.vip.index",[],"");?>">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/vip<?php echo $isvip?'_active':'';?>.png" alt="超级会员" style="position: absolute;margin-left: -40px;height: 16px;margin-top: 2px">
            </a>
            <?php echo $userinfo['nickname']?:$userinfo['name'];?>
        </div>
        <div class="size12 color4">
            <a href="<?php echo \Kuxin\Helper\Url::build("user.info.index",[],"");?>">编辑资料</a>
        </div>
    </div>
    <div class="bg-white ptb10 text-center" style="height: .8rem;">
        <a class="inline-block fl h100 border-r" style="width:25%" href="<?php echo \Kuxin\Helper\Url::build("user.invite.index",[],"");?>">
            <p class="size21 color32 bold"><?php echo $userinfo['data']['invite_reg_num'];?></p>
            <span class="size14">邀请</span>
        </a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.ticket.index",[],"");?>">
            <div class="inline-block fl h100 border-r" style="width:25%">
                <p class="size21 color32 bold"><?php echo $userinfo['assets']['surplus_ticket'];?></p>
                <span class="size14"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.ticket_caption");?></span>
            </div>
        </a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.assets.index",[],"");?>">
            <div class="inline-block fl h100 border-r" style="width:25%">
                <p class="size21 color32 bold"><?php echo $userinfo['assets']['balance'];?></p>
                <span class="size14"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "user.money_caption");?></span>
            </div>
        </a>
        <div class="inline-block fl h100" style="width:24%">
            <a href="<?php echo \Kuxin\Helper\Url::build("user.pay.recharge",[],"");?>">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/recharge.png" alt="去充值" style="width: .3rem;height: .3rem">
                <p class="color2 size14">去充值</p>
            </a>
        </div>
    </div>
    <div class="bg-white mb10 ptb10" style="height: .4rem;">
        <img class="pl20" style="width: .18rem" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/vip2.png" alt="超级会员">
        <img style="width: .6rem" src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/super_vip.png" alt="超级会员">
        <a class="fr mr20 size14" href="<?php echo \Kuxin\Helper\Url::build("user.vip.index",[],"");?>">前往开通 ></a>
    </div>
    <div class="bg-white mb10 pt-list">
        <a class="flex-wrp flex-align-center flex-between w100 mb25" href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>">
            <div class="flex-wrp flex-align-center">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/my_bookrack_hover.png" class="mr10 pt-list-icon">
                <span class="size14 lh100 color7">我的书架</span>
            </div>
            <?php $marknum=\Kuxin\Block::show('mark.num', ['userid'=>$userinfo['id']]);?>
            <div class="size12 color4">已收藏 <?php echo $marknum;?> 本</div>
        </a>
        <a class="flex-wrp flex-align-center flex-between w100 mb25" href="<?php echo \Kuxin\Helper\Url::build("user.history.index",[],"");?>">
            <div class="flex-wrp flex-align-center">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/history.png" class="mr10 pt-list-icon">
                <span class="size14 lh100 color7">我阅读过</span>
            </div>
            <?php $historynum=\Kuxin\Block::show('mark.num', ['userid'=>$userinfo['id'],'type'=>'history']);?>
            <div class="size12 color4">历史阅读 <?php echo $historynum;?> 本</div>
        </a>
        <a class="flex-wrp flex-align-center flex-between w100" href="<?php echo \Kuxin\Helper\Url::build("user.booklist.index",[],"");?>">
            <div class="flex-wrp flex-align-center">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/mark_hover.png" class="mr10 pt-list-icon">
                <span class="size14 lh100 color7">我的书单</span>
            </div>
            <?php $marknum=\Kuxin\Block::show('booklist.count', ['userid'=>$userinfo['id'],'type'=>'mark']);?>
            <?php $createnum=\Kuxin\Block::show('booklist.count', ['userid'=>$userinfo['id'],'type'=>'create']);?>
            <div class="size12 color4">创建 <?php echo $createnum;?> / 收藏 <?php echo $marknum;?></div>
        </a>
    </div>

    <div class="bg-white mb10 pt-list">
        <a href="<?php echo \Kuxin\Helper\Url::build("user.vote.index",[],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100 mb25">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/recomment.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">我的推荐</span>
                </div>
                <div class="size12 color4">推荐了 <?php echo $userinfo['data']['vote_num'];?> 本好书</div>
            </div>
        </a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.comment.publish",[],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100 mb25">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/comment.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">我评论过</span>
                </div>
                <div class="size12 color4">共评论了 <?php echo $userinfo['data']['comment_num'];?> 条</div>
            </div>
        </a>
        <?php $signlist=\Kuxin\Block::show('sign', ['userid'=>$userinfo['id'],'num'=>1]);?>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.sign.index",[],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100 mb25">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/sign.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">我的签到</span>
                </div>
                <?php if(empty($signlist[0]['date']) || $signlist[0]['date'] != date('Ymd')):?>
                <button class="btn-sign">未签到</button>
                <?php else:?>
                <?php if(!empty($signlist[0]['num'])):?>
                <div class="size12 color4">连续签到 <?php echo $signlist[0]['num'];?> 次</div>
                <?php endif;?>
                <?php endif;?>
            </div>
        </a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.invite.index",[],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100 mb25">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/invite.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">我的邀请</span>
                </div>
                <div class="size12 color4">邀请了 <?php echo $userinfo['data']['invite_reg_num']+$userinfo['data']['invite_visit_num'];?> 个用户</div>
            </div>
        </a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.star.index",[],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/rank_collect.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">我的评分</span>
                </div>
                <div class="size12 color4">对 <?php echo $userinfo['data']['star_num'];?> 本书进行了评分</div>
            </div>
        </a>
    </div>

    <div class="bg-white mb10 pt-list">
        <a href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>">
            <div class="flex-wrp flex-align-center flex-between w100 mb25">
                <div class="flex-wrp flex-align-center">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/about_us.png" class="mr10 pt-list-icon">
                    <span class="size14 lh100 color7">关于我们</span>
                </div>
                <!-- <div class="size12 color4">已收藏 6 本</div> -->
            </div>
        </a>
        <div class="flex-wrp flex-align-center flex-between w100">
            <div class="flex-wrp flex-align-center">
                <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/message_feedback.png" class="mr10 pt-list-icon">
                <span class="size14 lh100 color7">留言反馈</span>
            </div>
            <!-- <div class="size12 color4">已收藏 6 本</div> -->
        </div>
    </div>

    <div class="mb10 pt-list">
        <a class="pt-login-btn block" style="width:90vw;color:#fff" href="<?php echo \Kuxin\Helper\Url::build("user.auth.logout",[],"");?>">退出登录</a>
    </div>

</div>

<!-- 底部版权 -->
<div class="pt-copyright">
    <div class="size12  w100 text-center mt15 mb10"><a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私声明</a> | <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a> | <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a></div>
    <div class="size12 color4 w100 text-center mb10">Copyright © 2009-<?php echo date(Y);?> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></div>
    <div class="size12  w100 text-center"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<!-- js -->
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/jquery-3.3.1.js"></script>
<script>
    $('.pt-return,.pt-recall').click(function(){
        window.history.back();
    });
    $('.pt-ellipsis').click(function(){
        $('.pt-tip').toggle()
    });
    $('.pt-tip .pt-tip-item').click(function(){
        $('.pt-tip').toggle()
    });
</script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.mobile");?>
    <?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "app.use_cdn")):?>
    <script src="/api/stat/novel/info.js"></script>
    <script src="/api/stat/novel/read.js"></script>
    <?php endif;?>
</div>
<script>var __ADD_SIGN = '<?php echo \Kuxin\Helper\Url::build("user.sign.do",[],"");?>';</script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/layer/mobile/layer.js"></script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/userindex.js"></script>
</body>
</html>